import React from "react"
import PropTypes from "prop-types"

function TotalPrice({ income, expense }) {
  return (
    <div className="row col">
      <div className="col d-flex align-items-center">
        <h4 className="income">
          收入：<span>{income}</span>
        </h4>
      </div>
      <div className="col d-flex align-items-center">
        <h4 className="expense">
          支出：<span>{expense}</span>
        </h4>
      </div>
    </div>
  )
}

TotalPrice.propTypes = {
  income: PropTypes.number.isRequired,
  expense: PropTypes.number.isRequired
}

export default TotalPrice
